const odooModelName = 'res.company'

const fields_default = {
  child_ids: { name: null, partner_id: null },
  user_ids: { name: null, login: null, email: null }
}

const detail_columns = [
  'name',
  'email',
  'phone',
  'website',
  'vat',
  // 'parent_id__name',
  // 'child_ids__count',
  'user_ids__count'
]

const child_configs = {
  user_ids: {
    columns: ['name', 'login', 'email'],
    formItems: ['name', 'login', 'email']
  },
  child_ids: {
    columns: ['name', 'email', 'phone', 'website', 'vat'],
    formItems: ['name', 'email', 'phone', 'website', 'vat']
  }
}

const formItems = [
  'name',
  'email',
  'phone',
  'website',
  'vat' // 'parent_id'
]

const Model = {
  name: odooModelName,
  configs: {
    fields_default,
    detail_columns,
    child_configs,
    formItems
  }
}

export default Model
